﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;

namespace BLL
{
    public class KhoaBUO:IBUO<tbl_KhoaHoc>
    {
        CSDLQLDiemHSC3DataContext context = new CSDLQLDiemHSC3DataContext();
        public bool Insert(tbl_KhoaHoc obj)
        {
            throw new NotImplementedException();
        }

        public bool Delete(string id)
        {
            throw new NotImplementedException();
        }

        public bool Delete(tbl_KhoaHoc obj)
        {
            throw new NotImplementedException();
        }

        public List<tbl_KhoaHoc> GetAll()
        {
            return context.tbl_KhoaHocs.ToList<tbl_KhoaHoc>();
        }

        public tbl_KhoaHoc GetSingle(string id)
        {
            throw new NotImplementedException();
        }

        public bool Update(string id, tbl_KhoaHoc obj)
        {
            throw new NotImplementedException();
        }

        public IQueryable showKhoaHoc()
        {
            return context.tbl_KhoaHocs.Select(n => new 
            { 
                KhoaHoc=n.NamBatDau+" - "+n.NamKetThuc,
                id_KhoaHoc=n.id_KhoaHoc
            });
        }
    }
}
